using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace LicenseGenerator
{
    public partial class FormRegister : Form
    {
        #region Some constants and variables

        #endregion

        public FormRegister()
        {
            InitializeComponent();
        }

        private void btnGenerate_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtUser.Text) || string.IsNullOrEmpty(txtNumberOfLicense.Text))
            {
                System.Windows.Forms.MessageBox.Show("User name and number of licenses are required, please fill in before click Generate");
            }
            else
            {
                string key = util.GenerateKeyForInformation(txtUser.Text.Trim(), txtCompany.Text.Trim(), txtNumberOfLicense.Text.Trim());
                txtKey.Text = key;
            }
        }
    }
}